<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@ include file="/WEB-INF/view/common/head.jsp"%>
</head>
<body>
	<div style="margin-left: 20px; text-align: center;">
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</div>
	<button id="set">设置</button>
</body>
<script type="text/javascript">
	$(document).ready(function() {

		var colModel = [ {
			label : 'id',
			name : 'id',
			key : true
		}, {
			label : 'name',
			name : 'name'
		} ];

		$("#jqGrid").jqGrid({
			url : '${app}/user/list',
			mtype : "GET",
			styleUI : 'Bootstrap',
			datatype : "json",
			colModel : colModel,
			viewrecords : true,
			height : 250,
			width : 780,
			rowNum : 20,
			pager : "#jqGridPager"
		});

		$("#set").click(function() {

		});
		// add navigation bar with some built in actions for the grid
		$('#jqGrid').navGrid('#jqGridPager', {
			edit : false,
			add : false,
			del : false,
			search : true,
			refresh : true,
			view : true,
			position : "left",
			cloneToTop : false
		});
	});
</script>
</html>